﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MesBSW.DAL.MesDB
{
    [Serializable]
    [Table("prod_cycle")]
    public class ProdCycle
    {
        /// <summary>
        /// ID，自增长
        /// </summary>
        [Column("id"), Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }

        /// <summary>
        /// 工单所属部门，引用base_dept的ID
        /// </summary>
        [Column("dept_id")]
        public int DeptID { get; set; }

        /// <summary>
        /// 产品类型，分为防水与不防水，而防水又分为外发加工与内部加工
        /// </summary>
        [Column("prod_type")]
        public string ProdType { get; set; }

        /// <summary>
        /// 是否COB产品，1代表是COB产品，0代表不是COB产品
        /// </summary>
        [Column("is_cob")]
        public int IsCOB { get; set; }

        /// <summary>
        /// 是否齐料
        /// </summary>
        [Column("is_complete")]
        public int IsComplete { get; set; }

        /// <summary>
        /// 最小适用数量 
        /// </summary>
        [Column("min_qty")]
        public decimal MinQty { get; set; }

        /// <summary>
        /// 最大适用数量 
        /// </summary>
        [Column("max_qty")]
        public decimal MaxQty { get; set; }


        /// <summary>
        /// 齐料的天数
        /// </summary>
        [Column("mat_wait_days")]
        public decimal? MatWaitDays { get; set; }

        /// <summary>
        /// SMT的工作天数 
        /// </summary>
        [Column("smt_days")]
        public decimal? SmtDays { get; set; }

        /// <summary>
        /// 焊接的工作天数
        /// </summary>
        [Column("weld_days")]
        public decimal? WeldDays { get; set; }

        /// <summary>
        /// 测试最大测试天数
        /// </summary>
        [Column("test_days")]
        public decimal? TestDays { get; set; }

        /// <summary>
        /// 包装的天数 
        /// </summary>
        [Column("pack_days")]
        public decimal? PackDays { get; set; }

        /// <summary>
        /// 异常的天数 
        /// </summary>
        [Column("err_days")]
        public decimal? ErrDays { get; set; }

        /// <summary>
        /// 总天数 
        /// </summary>
        [Column("total_days")]
        public decimal? TotalDays { get; set; }

        /// <summary>
        /// 建档日期
        /// </summary>
        [Column("create_date")]
        public DateTime CreateDate { get; set; }

        /// <summary>
        /// 建档人
        /// </summary>
        [Column("create_user")]
        public string CreateUser { get; set; }
    }
}
